package com.beiding.jsonanalyzer.flow.flowevents;

import com.beiding.jsonanalyzer.flow.FlowEvent;

/**
 * 批结束事件
 * @author 丁常磊
 * @date 2022/5/23 13:34
 */

public class BatchEndEvent<T> implements FlowEvent<T> {

    /**
     * 批对象
     */
    private Object batch;

    public BatchEndEvent(Object batch) {
        this.batch = batch;
    }

    public Object getBatch() {
        return batch;
    }

    private static final BatchEndEvent EVENT_TYPE = new BatchEndEvent(null);

    /**
     * 创建事件类型
     * @param <T>
     * @return
     */
    public static <T> BatchEndEvent<T> eventType() {
        return EVENT_TYPE;
    }


}
